package com.example.bili.view.activity;

import android.content.Intent;
import android.os.SystemClock;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;
import android.widget.ImageView;

import com.example.bili.R;
import com.example.bili.base.BaseActivity;
 /** 
      *       类注释
      * @author 杨云天换个
      * @date 2017/3/21
      * 类的描述：
      */
public class MainActivity extends BaseActivity {

    @Override
    protected void m_oncreate() {
        final ImageView imageView = (ImageView) findViewById(R.id.y_wel);
        new Thread() {
            @Override
            public void run() {
                //创建了一个持续3秒的缩放补间动画
                Animation animation = new ScaleAnimation(
                        0.5f, 1.0f, 0.5f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
                animation.setDuration(3000);
                imageView.clearAnimation();
                imageView.startAnimation(animation);//启动动画

                SystemClock.sleep(3200);//睡眠
                startActivity(new Intent(MainActivity.this, LoginActivity.class));//跳转登录页
            }
        }.start();
    }

    @Override
    protected void initview() {
    }

    @Override
    public int getLayoutView() {
        return R.layout.activity_main;
    }

    @Override
    protected void onStop() {
        super.onStop();
        finish();
    }
}
